#pragma once

#include <iostream>
#include <fstream>
#include <string>
#include <istream>
#include <ostream>
#include <vector>
#include <map>
#include <unordered_map>
#include <memory>
#include <filesystem>
#include <sstream>

#define NONE         "\033[m"
#define RED          "\033[0;32;31m"
#define LIGHT_RED    "\033[1;31m"
#define GREEN        "\033[0;32;32m"
#define LIGHT_GREEN  "\033[1;32m"
#define BLUE         "\033[0;32;34m"
#define LIGHT_BLUE   "\033[1;34m"
#define DARY_GRAY    "\033[1;30m"
#define CYAN         "\033[0;36m"
#define LIGHT_CYAN   "\033[1;36m"
#define PURPLE       "\033[0;35m"
#define LIGHT_PURPLE "\033[1;35m"
#define BROWN        "\033[0;33m"
#define YELLOW       "\033[1;33m"
#define LIGHT_GRAY   "\033[0;37m"
#define WHITE        "\033[1;37m"

#ifdef _WIN32
#include<Windows.h>
#endif

#ifdef _CONSOLE

#define LOGI(fmt, ...)                                                     \
    {                                                                      \
        printf(NONE "[%s] [%s] " fmt "\n", __TIMESTAMP__, "info", __VA_ARGS__); \
        printf(NONE);                                                          \
    }
#define LOGE(fmt, ...)                                                          \
    {                                                                           \
        printf(RED "[%s] [%s] " fmt "\n", __TIMESTAMP__, "error", __VA_ARGS__); \
        printf(NONE);                                                           \
    }
#define LOGD(fmt, ...)                                                            \
    {                                                                             \
        printf(GREEN "[%s] [%s] " fmt "\n", __TIMESTAMP__, "debug", __VA_ARGS__); \
        printf(NONE);                                                             \
    }
#define LOGW(fmt, ...)                                                               \
    {                                                                                \
        printf(YELLOW "[%s] [%s] " fmt "\n", __TIMESTAMP__, "warning", __VA_ARGS__); \
        printf(NONE);                                                                \
    }
#endif // _CONSOLE_


#define FAILED(X) {if(!X) return false;}



